package com.one.blocks.rbac.mapper;

import com.one.blocks.mvc.mapper.BaseMapper;
import com.one.blocks.rbac.domain.SysMenu;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @author <a href="mailto:idler41@163.con">idler41</a> created on 2022-02-14 13:57:56
 */
@Repository
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 查询指定角色的所有权限
     *
     * @param roleId 指定角色id
     * @return 所有权限
     */
    Set<String> selectPermission(Integer[] roleId);

    Set<String> selectPermissionAll();

    List<SysMenu> selectAllOfOrder();

    List<SysMenu> selectByRoleId(Integer roleId);
}